/**
 * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.html or http://ckeditor.com/license
 */

CKEDITOR.editorConfig = function( config ) {
	// Define changes to default configuration here.
	// For the complete reference:
	// http://docs.ckeditor.com/#!/api/CKEDITOR.config

	// The toolbar groups arrangement, optimized for two toolbar rows.
	config.toolbarGroups = [
		{ name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
		{ name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
		{ name: 'links' },
		{ name: 'insert' },
		{ name: 'forms' },
		{ name: 'tools' },
		{ name: 'document',	   groups: [ 'mode', 'document', 'doctools' ] },
		{ name: 'others' },
		'/',
		{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
		{ name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
		{ name: 'styles' },
		{ name: 'colors' },
		{ name: 'about' }
	];

	// Remove some buttons, provided by the standard plugins, which we don't
	// need to have in the Standard(s) toolbar.
	//config.removeButtons = 'Underline,Subscript,Superscript';

	// Se the most common block elements.
	config.format_tags = 'p;h1;h2;h3;pre';
	config.filebrowserImageBrowseUrl = "../../../../../CKEditor/BrowseImage";
	config.filebrowserImageUploadUrl = "../../../../../CKEditor/UploadImage";

	// Make dialogs simpler.
	//config.removeDialogTabs = 'image:advanced;link:advanced';

    //LynxWebLog additions
	//config.toolbar = full;
	config.extraAllowedContent = 'span(!FontColor1);span(!FontColor2);span(!FontColor3);' +
        'span(!FontColor1BG);span(!FontColor2BG);span(!FontColor3BG);' +
        'span(!FontComic);span(!FontCourier);span(!FontTimes);' +
        'span(!FontSmaller);span(!FontLarger);span(!FontSmall);span(!FontBig);span(!FontDouble);' +
	    'img[!height][!width](img-responsive)';

    config.pasteFromWordRemoveStyles = false;
	config.pasteFromWordRemoveFontStyles = false;
	config.contentsCss = "/LynxWebLog/Content/Site.css";
	config.coreStyles_bold = {
	    element: 'span',
	    attributes: { 'class': 'Bold' }	};
	config.coreStyles_italic = {
	    element: 'span',
	    attributes: { 'class': 'Italic' }	};
	config.coreStyles_underline = {
	    element: 'span',
	    attributes: { 'class': 'Underline' }	};
	config.coreStyles_strike = {
	    element: 'span',
	    attributes: { 'class': 'StrikeThrough' },
	    overrides: 'strike'	};
    config.coreStyles_subscript = {
        element: 'span',
        attributes: { 'class': 'Subscript' },
        overrides: 'sub'    };
    config.coreStyles_superscript = {
        element: 'span',
        attributes: { 'class': 'Superscript' },
        overrides: 'sup'
    };

    config.extraPlugins = 'magicline,pagebreak,tabletools,image2';
    config.removePlugins = 'image';

};
